interface CatInfo {
  age: number;
  breed: string;
}

type CatName = "miffy" | "boris" | "mordred";

const cats: Record<CatName,CatInfo> = {
  miffy: { age: 10, breed: "Persian" },
  boris: { age: 5, breed: "Maine Coon" },
  mordred: { age: 16, breed: "British Shorthair" },
};

cats.boris;


interface Staff {
  name:string,
  salary:number,
}

type StaffJson = Record<keyof Staff, string>

const product: StaffJson = {
  name: 'John',
  salary:'3000'
}


type seniorRole = 'manager'
type technicalRole = 'developer'
const benefits: Partial<Record<seniorRole, 'Free Parking'> & Record<technicalRole, 'Free Coffee'>> = {};


benefits.manager = 'Free Parking';
benefits.developer = 'Free Coffee';//ERROR: no free parking for dev


// type Status = 'error' | 'success';

// const statusImages: Record<Status, string> = {
//   error: 'image1.png',
//   success: 'image2.png'
// };

enum Status {
  'error' = 'error',
  'success' = 'success',
}

const statusImages: Record<Status, string> = {
  error: 'image1.png',
  success: 'image2.png',
};
